A simple tick in a small box can lead to new boundary conditions available to users. Examples shown for zero pressure gradients, general Robin boundary conditions with application to Slip flows.
Attachments: |
SSK3.sim.7z (424 KB)
|
The attached simulation saved in STAR-CCM+ v9.02 shows each of the above boundary conditions applied on the right side of a chamber where a pressure pulse is given on the left side. The videos below show how the pulse reacts to each of the three boundary conditions.
Let's begin with a Dirichlet boundary condition, or = 0:
A Neumann boundary condition, or = 1:
And a Robin boundary condition with = 0.9:
The ignore-box allows us to generally apply the above boundary conditions to all our physical equations. In the examples above we ve seen it applied to pressure boundary conditions. Another example, that is worthy of mention, is the use of Robin boundary conditions to approximate the slip flow regime. That is, those flows for which rarefaction effects start to become non-negligible and the molecular structure of the fluid can no longer be ignored. In the slip flow regime, departure from continuum behaviour is slight, corresponding to Knudsen numbers in the range of 10^-3 to 10^-1 and can be accommodated by just changing the no-slip boundary condition to one of partial slip:
where Uw and dU/dn|w are velocity and normal derivative at the wall, Kn is the Knudsen number and c is a positive constant characterizing the molecular interaction of the gas with the wall. That is completely analog to the Robin boundary condition shown above for the pressure. In particular, the no-slip boundary is given by Kn=0, full slip is given by .
How do we implement it in the code? Just use our ignore box tool and define a field function as
with
where n is the distance between cell centroid and boundary centroid. How do we calculate that distance? Using again the ignore box tool. Define a field function, lets call it cellCentroid. Define it as $$Centroid (a vector function), and tick the ignore boundary value box. Then
n = mag($$Centroid - $$cellCentroid)
when evaluated at boundary faces.
Finally, you surely will ask yourself: Is there a boundary condition that allows the pressure pulse to pass through the boundary without reflections? Yes, indeed. In fact, the reflected wave has passed without reflection through the left wall. The boundary condition that allows this is the Freestream:
See also:
User Coding: How do I access variables on wall boundaries?
How to plot the near wall velocity?
and other Swiss STAR-CCM+ Knife tools:
Swiss STAR-CCM+ Knife: [1] Big Sources: How to override equations and fix cell physical values.
Swiss STAR-CCM+ Knife: [2] Taming of the Courant Number: Automatic Time-Step Control
Swiss STAR-CCM+ Knife: [4] Manual cosimulator: How to transfer information across multiple simulations via macro.
Swiss STAR-CCM+ Knife: [5] Pixel comparison: Integrate image processing tools in your CFD workflow.
Swiss STAR-CCM+ Knife: [7] Command and conquer: How to pass command line parameters to your macros.
Swiss STAR-CCM+ Knife: [8] Schmitt Trigger: Let STAR-CCM+ remember things.